#ifndef CHARTSDEMO01_H
#define CHARTSDEMO01_H

#include <QWidget>

namespace Ui {
class ChartsDemo01;
}

class QChart;
class QLineSeries;
class QChartView;

class ChartsDemo01 : public QWidget {
    Q_OBJECT

public:
    explicit ChartsDemo01(QWidget *parent = nullptr);
    ~ChartsDemo01();

private slots:
    void on_dataTabWidget_cellChanged(int row, int column);

    void on_updateChartBtn_clicked();

private:
    Ui::ChartsDemo01 *ui;

    struct TData {
        QVector<int> xAxis;
        QVector<int> yAxis;
    } data_;

    QChart      *chart_;
    QLineSeries *series_;
    QChartView  *view_;
};

#endif  // CHARTSDEMO01_H
